package org.apache.servicecomb.samples.practise.houserush.customer.manage.api;

import org.apache.servicecomb.samples.practise.houserush.customer.manage.entity.Customer;
import org.apache.servicecomb.samples.practise.houserush.customer.manage.entity.Qualification;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import java.util.List;

public interface CustomerManagerApi {

    //    GET 根据id查询客户 customers/{id}
    Customer findCustomer(int id);

    //    GET 查询所有客户 customers
    List<Customer> indexCustomers();

    //    POST 创建客户 customers
    Customer createCustomer(Customer customer);

    //    PUT 根据id修改客户信息 customers/{id}
    Customer updateCustomer(int id, Customer customer);

    //    PUT 根据id修改抢房资格 customers/{id}/update_qualifications
    Customer updateCustomerQualifications(int id, List<Qualification> qualifications);

    //    DELETE 根据id删除客户 customers/{id}
    void removeCustomer(int id);
}
